//
//  ManagerTabbarViewController.swift
//  EduManage
//
//  Created by design02 on 16/12/22.
//  Copyright © 2016年 wsl. All rights reserved.
//

import UIKit

class ManagerTabbarViewController: UITabBarController {
    

    override func viewDidLoad() {
        super.viewDidLoad()
        
        initManagerTabBarItems()

    }

    func initManagerTabBarItems() {
        
        #if BELLSUPER || HSSUPER || TXSUPER
            addChildViewController(controller: OfficeViewController(), barTitle: "办公", navTitleTitle: "办公管家", image: #imageLiteral(resourceName: "huibangong"), selectedImage: #imageLiteral(resourceName: "lanbangong"))
            
            addChildViewController(controller: ManangeMainViewController(), barTitle: "家校", navTitleTitle: "家校管家", image: #imageLiteral(resourceName: "32classb"), selectedImage: #imageLiteral(resourceName: "32classg"))
        #endif
        
    }
    
    func addChildViewController(controller: UIViewController, barTitle: String, navTitleTitle: String, image: UIImage, selectedImage: UIImage) {
        
        let baseNav = UINavigationController(rootViewController: controller)
        
        baseNav.tabBarItem.image = image
        baseNav.tabBarItem.selectedImage = selectedImage
        
        baseNav.tabBarItem.title = barTitle
        controller.navigationItem.title = navTitleTitle
        
        self.addChildViewController(baseNav)
    }
    

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
